package com.kkshop.gwt.util;


public class ConfigUtils {
    
    public static boolean isSingleEnvironment() {
        return "true".equalsIgnoreCase(getProperty("isSingleEnvironment"));
    }
    
    public static native String getProperty(String propertyName) /*-{
        var metas = $wnd.document.getElementsByTagName("meta");
        for (var i = 0, n = metas.length; i < n; ++i) {
            var meta = metas[i];
            var name = meta.getAttribute("name");
            if (name && name == "gwt:property") {
                var content = meta.getAttribute("content");
                if (content) {
                    var name = content, value = "";
                    var eq = content.indexOf("=");
                    if (eq != -1) {
                        name  = content.substring(0, eq);
                        value = content.substring(eq+1);
                        if (name == propertyName){
                            return value;
                        }
                    }
                }
            }
        } 
    }-*/;
}
